<!-- App.vue -->
<template>
  <v-app class="min-w-[875px]">
    <navBar />
    <v-main class="min-w-[1064px]">
      <router-view  v-if="appStore.materialCategory.length"/>
    </v-main>
    <AppFooter class="min-w-[1064px]" />
  </v-app>
</template>

<script setup>
import { useAppStore } from '@/stores/app'
import { useAuthStore } from '@/stores/auth';
const AuthStore = useAuthStore()
const appStore = useAppStore()

onMounted(async () => {
  appStore.getMaterialCategory()
  AuthStore.token && AuthStore.fetchUserInfo()
})
</script>
